import axios from "../../util/request"

export function Table(val){
    return axios({
        data:val,
        method:"GET",
        url:`/adminapi/setting/group_data?status=${val.status}&page=${val.page}&limit=${val.limit}&gid=${val.gid}`
    })
}

export function addlist(val){
    return axios({
        data:val,
        method:"post",
        url:"/adminapi/setting/group_data"
    })
}
export function editlist(val){
    return axios({
        data:val,
        method:"PUT",
        url:"/adminapi/setting/group_data/"+val.id
    })
}

export function dellist(val){
    return axios({
        data:val,
        method:"DELETE",
        url:`/adminapi/setting/group_data/${val.id}`
    })
}

export function Switch(val){
    return axios({
        data:val,
        method:"PUT",
        url:`/adminapi/setting/group_data/set_status/${val.id}/${val.status}`
    })
}